package com.luanqibazao;

public class TestArray {
    public static void main(String[] args) {
        //找出数组中最大的元素
        double max = a[0];
        for (int i = 1; i < a.length; i++) {
            if (a[i] > max) max = a[i];
        }

        //计算数组元素的平均值
        int N=a.length;
        double sum=0.0;
        for(int i=0;i<N;i++){
            sum+=a[i];
        }
        double average=sum/N;
    }
}
